package com.qg.controller;

import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 首页控制器
 * @auther lcy
 * @date 2018/9/28
 */
@Controller
public class HomeController {
    /**
     * 系统首页
     *
     * 此controller完成对首页页面的链接的权限的控制
     *
     * @return
     */
    /*@GetMapping(value = {"/", "/index"})
    public String index() {
        return "home/index";
    }*/

    /**
     *测试权限的使用
     */
   /* @RequestMapping("/update")
    @RequiresRoles(value={"admin","user"},logical= Logical.AND)
    @RequiresPermissions("user:update")
    public void testPermission(){
        System.out.println("成功访问");
    }*/
}
